package com.sss.springcloud.service;

import com.sss.springcloud.common.Result;
import com.sss.springcloud.service.impl.AccountServiceFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author sss
 * @date 2020-03-13 13:03
 **/
@Component
@FeignClient(value = "cloud-seata-account-service",fallback = AccountServiceFeignFallback.class)
public interface AccountService {
    @PostMapping("account/decrease")
    Result decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
